Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use an alias for react-dom/client if not installed #410

Merged
merged 1 commit into from
Jun 16, 2022

Conversation

IanVS
Copy link
Member

@IanVS IanVS commented Jun 15, 2022

This implements a suggestion in vitejs/vite#6007 (comment)
to alias react-dom/client to our placeholder file when the dependency is not found.

In Vite 3.0, our current approach will no longer work, and we'll need to use this method instead. But it works in Vite 2 as well, so we might as well merge this now while we work out the rest of Vite 3 compatibility.

This implements a suggestion in vitejs/vite#6007 (comment)
to alias react-dom/client to our placeholder file when the dependency is not found.

In vite 3.0, our current approach will no longer work, and we'll need to use this method instead.
@IanVS IanVS requested a review from joshwooding June 16, 2022 13:47
Copy link
Member

@joshwooding joshwooding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@IanVS IanVS mentioned this pull request Jun 16, 2022
@IanVS IanVS merged commit 3d4b66b into main Jun 16, 2022
@IanVS IanVS deleted the adjust-react-dom-handling branch June 16, 2022 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants